# news/urls.py
from django.urls import path

from .controllers.crawl_news import CrawlNewsView
from .controllers.image_processing import ImageProcessingView
from .views.news import (
    NewsCreateView,
    NewsDeleteView,
    NewsDetailView,
    NewsListByCategoryView,
    NewsUpdateView,
)

urlpatterns = [
    path('news/', NewsCreateView.as_view(), name='create_news'),
    path('news/<int:news_id>/', NewsDetailView.as_view(), name='get_news'),
    path('news/<int:news_id>/update/', NewsUpdateView.as_view(), name='update_news'),
    path('news/<int:news_id>/delete/', NewsDeleteView.as_view(), name='delete_news'),
    path('news/category/<str:category>/', NewsListByCategoryView.as_view(), name='list_by_category'),
    path('image-processing/generate/', ImageProcessingView.as_view(), name='generate_image_content'),
    path('crawl-news', CrawlNewsView.as_view(), name='crawl-news'),
]